package in.muton.panels.paginator;

import org.apache.wicket.markup.html.CSSPackageResource;
import org.apache.wicket.markup.html.navigation.paging.IPageable;
import org.apache.wicket.markup.html.navigation.paging.PagingNavigator;

public class EdusharePageNavigator extends PagingNavigator {
	private static final long serialVersionUID = 5597433734024878837L;

	IPageable pageableListView;

	public EdusharePageNavigator(String id, IPageable pageable) {
		super(id, pageable);
		pageableListView = pageable;
		add(CSSPackageResource.getHeaderContribution(
				EdusharePageNavigator.class, "EdusharePageNavigator.css"));
	}

	@Override
	public boolean isVisible() {
		if (super.isVisible() == false)
			return false;
		if (pageableListView.getPageCount() <= 1)
			return false;
		return true;
	}
}
